/* 
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

// --------------------------------------------------------------------------------------------------
// This file was automatically generated by J2CS Translator (http://j2cstranslator.sourceforge.net/). 
// Version 1.3.6.20101125_01     
// 12/1/10 3:36 PM    
// ${CustomMessageForDisclaimer}                                                                             
// --------------------------------------------------------------------------------------------------
namespace ILOG.J2CsMapping.Util
{
	
	using System;
	using System.Collections;
	using System.Collections.Generic;
	using System.ComponentModel;
	using System.IO;
	using System.Runtime.CompilerServices;
	
	/// <summary>
	/// A ParseException is thrown when the String being parsed is not in the correct
	/// form.
	/// </summary>
	///
	
	public class ParseException : Exception {
	
		private int errorOffset;
	
		/// <summary>
		/// Constructs a new instance of this class with its walkback, message and
		/// the location of the error filled in.
		/// </summary>
		///
		/// <param name="detailMessage">String The detail message for the exception.</param>
		/// <param name="location">int The index at which the parse exception occurred.</param>
		public ParseException(String detailMessage, int location) : base(detailMessage) {
			errorOffset = location;
		}

        /// <summary>
        /// Constructs a new instance of this class with its walkback, message
        /// </summary>
        /// <param name="detailMessage">String The detail message for the exception.</param>
        public ParseException(string detailMessage)
            : base(detailMessage)
        {
        }

		/// <summary>
		/// Answers the index at which the parse exception occurred.
		/// </summary>
		///
		/// <returns>int The index of the parse exception.</returns>
		public int GetErrorOffset() {
			return errorOffset;
		}
	}
}
